﻿var OrderList =
{
    PreViewUrl: "",
    DeleteUrl: "",
    Init: function () {
        $(":button[name='btnView']").click(function () {
            var orderId = $(this).parent().find(":hidden[name='OrderId']").val();
            var uid = $(this).parent().find(":hidden[name='Uid']").val();
            window.open(OrderList.PreViewUrl + "?OrderId=" + orderId + "&Uid=" + uid);
        })

        $(":button[name='btnDel']").click(function () {
            var orderId = $(this).parent().find(":hidden[name='OrderId']").val();
            var uid = $(this).parent().find(":hidden[name='Uid']").val();
            if (confirm("删除警告\n确定要继续吗!"))
                $.post(OrderList.DeleteUrl, { OrderId: orderId, Uid: uid }, function (result) {
                    result = $(result);
                    window.CloseDialog = function () { result.dialog("destroy"); location.reload(); }
                    result.dialog({ width: 500, modal: true, closeText: "×", close: function () { window.CloseDialog(); } });
                });
        })
    }
}
var OrderView =
 {
     ProcessUrl: "",
     Init: function () {
         $(".setpBySetp").tabs();
         $("#process").ajaxForm(function () {
             location.assign(OrderView.ProcessUrl + "#process");
             location.reload();
         });
     }
 }